package net.pws.common.security.spi;

import java.io.Serializable;

public interface Principal extends Serializable {
    
    /**
     * @return the user id
     */
    public String getId();
    
    /**
     * @return the user name
     */
    public String getName();
    
    /**
     * @return the group code which the user belong-to
     */
    public String getGroupCode();
    
    /**
     * @return
     */
    public boolean hasPrivileged();
    
    /**
     * @return
     */
    public boolean isWebAccessAllowed();
    
    /**
     * @return
     */
    public boolean isMobileAccessAllowed();
    
    /**
     * @return the user object
     */
    public Object getDetail();
    
    /**
     * @return the binded-role list
     */
    public Role[] getRoles();
    
}
